{% extends 'base.html' %}
{% block page_content %}
<div class="col-md-offset-1 col-md-8">
    <div class="panel panel-primary">
        <div class="panel-heading">部门信息列表</div>
        <div class="panel-body">
           {% if pagpermission.has_add %}
            <div class="row">
                <div class="col-md-offset-1 col-md-8" style="margin-bottom: 15px;">
                    <a href="/fare/depadd/" type="button" class="btn btn-primary " style="float:right;"><i
                            class="fa fa-plus" aria-hidden="true" style="margin-right: 6px;"></i>增加</a>
                </div>
            </div>
            {% endif %}
            <div class="row">
                <div class="col-md-offset-1 col-md-10">
                    <table class="table table-striped table-hover table-bordered">
                        <thead>
                        <th class="bg-info text-center" >部门名称</th>
                        <th class="bg-info text-center" >备注说明</th>
                        <th class="bg-info text-center" colspan="2">允许的操作</th>
                        </thead>
                        <tbody>
                        {% for row in deplist %}
                            <tr>
                                <td>{{ row.dep_name }}</td>
                                <td>{{ row.dep_script }}</td>
                                <td>
                                   {% if pagpermission.has_edit %}
                                    <a href="/fare/depedit/{{ row.id }}/" class="btn btn-info"> <i
                                            class="fa fa-pencil-square-o"
                                            aria-hidden="true" style="margin-right: 6px;"></i>编辑</a>
                                     {% endif %}
                                </td>
                                <td>
                                    {% if pagpermission.has_del %}
                                    <a href="/fare/depdel/{{ row.id }}/" class="btn btn-danger"><i
                                            class="fa fa-trash-o fa-fw"
                                            aria-hidden="true" style="margin-right: 6px;"></i>删除</a>
                                     {% endif %}

                                </td>
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}

